package com.ruoyi.type.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.type.mapper.AnimationMapper;
import com.ruoyi.type.domain.Animation;
import com.ruoyi.type.service.IAnimationService;

/**
 * 动漫Service业务层处理
 * 
 * @author ucu
 * @date 2024-05-04
 */
@Service
public class AnimationServiceImpl implements IAnimationService 
{
    @Autowired
    private AnimationMapper animationMapper;

    /**
     * 查询动漫
     * 
     * @param id 动漫主键
     * @return 动漫
     */
    @Override
    public Animation selectAnimationById(Long id)
    {
        return animationMapper.selectAnimationById(id);
    }

    /**
     * 查询动漫列表
     * 
     * @param animation 动漫
     * @return 动漫
     */
    @Override
    public List<Animation> selectAnimationList(Animation animation)
    {
        return animationMapper.selectAnimationList(animation);
    }

    /**
     * 新增动漫
     * 
     * @param animation 动漫
     * @return 结果
     */
    @Override
    public int insertAnimation(Animation animation)
    {
        return animationMapper.insertAnimation(animation);
    }

    /**
     * 修改动漫
     * 
     * @param animation 动漫
     * @return 结果
     */
    @Override
    public int updateAnimation(Animation animation)
    {
        return animationMapper.updateAnimation(animation);
    }

    /**
     * 批量删除动漫
     * 
     * @param ids 需要删除的动漫主键
     * @return 结果
     */
    @Override
    public int deleteAnimationByIds(Long[] ids)
    {
        return animationMapper.deleteAnimationByIds(ids);
    }

    /**
     * 删除动漫信息
     * 
     * @param id 动漫主键
     * @return 结果
     */
    @Override
    public int deleteAnimationById(Long id)
    {
        return animationMapper.deleteAnimationById(id);
    }
}
